package com.vcms.cms.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Guestbook entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "guestbook", catalog = "vcms_0.1")
public class Guestbook implements java.io.Serializable {

	// Fields

	private Integer guestbookId;
	private GuestbookCtg guestbookCtg;
	private User user;
	private Site site;
	private String ip;
	private Timestamp createTime;
	private Timestamp replyTime;
	private Boolean isChecked;
	private Boolean isRecommend;
	private String title;
	private String content;
	private String reply;
	private String email;
	private String phone;
	private String qq;

	// Constructors

	/** default constructor */
	public Guestbook() {
	}

	/** full constructor */
	public Guestbook(GuestbookCtg guestbookCtg, User user, Site site,
			String ip, Timestamp createTime, Timestamp replyTime,
			Boolean isChecked, Boolean isRecommend, String title,
			String content, String reply, String email, String phone, String qq) {
		this.guestbookCtg = guestbookCtg;
		this.user = user;
		this.site = site;
		this.ip = ip;
		this.createTime = createTime;
		this.replyTime = replyTime;
		this.isChecked = isChecked;
		this.isRecommend = isRecommend;
		this.title = title;
		this.content = content;
		this.reply = reply;
		this.email = email;
		this.phone = phone;
		this.qq = qq;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "guestbookId", unique = true, nullable = false)
	public Integer getGuestbookId() {
		return this.guestbookId;
	}

	public void setGuestbookId(Integer guestbookId) {
		this.guestbookId = guestbookId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "guestbookCtgId")
	public GuestbookCtg getGuestbookCtg() {
		return this.guestbookCtg;
	}

	public void setGuestbookCtg(GuestbookCtg guestbookCtg) {
		this.guestbookCtg = guestbookCtg;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "siteId")
	public Site getSite() {
		return this.site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

	@Column(name = "ip", length = 100)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "replyTime", length = 19)
	public Timestamp getReplyTime() {
		return this.replyTime;
	}

	public void setReplyTime(Timestamp replyTime) {
		this.replyTime = replyTime;
	}

	@Column(name = "isChecked")
	public Boolean getIsChecked() {
		return this.isChecked;
	}

	public void setIsChecked(Boolean isChecked) {
		this.isChecked = isChecked;
	}

	@Column(name = "isRecommend")
	public Boolean getIsRecommend() {
		return this.isRecommend;
	}

	public void setIsRecommend(Boolean isRecommend) {
		this.isRecommend = isRecommend;
	}

	@Column(name = "title", length = 300)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "content")
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "reply")
	public String getReply() {
		return this.reply;
	}

	public void setReply(String reply) {
		this.reply = reply;
	}

	@Column(name = "email", length = 100)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "phone", length = 20)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "qq", length = 20)
	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

}